package com.github.xiaolyuh.base;


import com.github.xiaolyuh.exception.CacheException;

public interface BasicCacheManager {

	/**
	 * 设置缓存
	 *
	 * @param key
	 * @param value
	 * @param expireTime
	 * @return
	 * @throws CacheException
	 */
	boolean set(String key, Object value, int expireTime) throws CacheException;

	/**
	 * 单个获取缓存
	 *
	 * @param key
	 * @param clazz
	 * @return
	 * @throws CacheException
	 */
	Object get(String key, Class clazz) throws CacheException;

	/**
	 * 缓存开关
	 *
	 * @return
	 */
	boolean isCacheEnable();

	/**
	 * 删除缓存
	 *
	 * @param key
	 * @return
	 * @throws CacheException
	 */
	boolean delete(String key) throws CacheException;
	
}